package cn.cyh.queue_service.mapper;

import cn.cyh.queue_service.model.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 用户Mapper接口
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    
    /**
     * 更新用户最后登录时间
     * 
     * @param userId 用户ID
     * @return 更新影响行数
     */
    @Update("UPDATE sys_user SET last_login_time = NOW() WHERE id = #{userId}")
    int updateLastLoginTime(@Param("userId") Long userId);
} 